Field of the Invention
Embodiments of the present invention generally relate to a method and apparatus for modifying behavior of code for controller-based devices.
Description of the Related Art
The use of field programmable gate arrays (FPGAs) and other controller-based devices (e.g. microcontroller or microprocessor based), such as MCU, SoC, mobile phones, computers, etc. have grown considerably popular. Low manufacturing costs, availability, and customization of controllers have led to a proliferation of microcontrollers and Systems on a Chip (SoC) (e.g., PIC, ARDUINO, RASPBERRY PI and the like) being used by commercial companies and hobbyists alike for creation of devices. Controller-based devices include a processor core and a memory, which are programmable for processing input/output data in communication with peripherals. Program memory in the form of NOR FLASH or OTP ROM is also often included on such controller-based devices, as well as a small amount of random access memory (RAM). Several such controller-based devices are designed for embedded applications within larger devices.
Real world applications of such controller-based devices can potentially include connecting controller-based devices with conventional objects or systems as peripherals, thereby enabling digitization, connectivity and even remote control of such peripherals. However, several challenges exist in making such real world applications accessible to average users, particularly those with limited or no programming and hardware knowledge.
Configuring the peripherals (conventional objects or systems) for use with controller-based devices is, in general, quite complex. Further, in several applications of controller-based devices, ability to accommodate dynamic inputs and/or generate dynamic output, may be desirable. Configuring and programming controller-based devices to accommodate dynamic inputs or outputs requires writing or rewriting the code for all controller-based devices, and is very challenging for average users because rewriting code or reprogramming the controller-based devices needs an understanding of hierarchies of the peripherals and suitable controller-based devices for the peripherals, coding commands, proper calling syntaxes, and other programming parameters. In the absence of accurate code, a program will fail to run or produce errors. Further, rewriting programs every time a modification in input, output, or any other change in code behavior is required, can be cumbersome and excessively time consuming, even in simple and small groups of such controller-based devices. In several cases, reprogramming or rewriting code may be nearly as laborious as programming or writing the code for the first time.
Further, as the “Internet of Things (IoT)” grows, more and more such controller-based devices are connected to one another and/or to the Internet, significantly increasing the complexity of reprogramming associated with achieving desired code behavior. Groups of such devices may communicate with one another and/or to a gateway such that the gateway becomes a proxy for the Internet communications for the so-called edge devices. The edge devices may communicate through one or more gateways, or directly as independent devices. Within a group, all the devices (gateway and edge) must be programmed in a compatible manner to facilitate interoperability. In addition to reprogramming according to the customization for achieving desired code behavior, managing compatibility every time a customization is implemented may also be excessively time consuming.
Thus, there is a need in the art for modifying behavior of code for a controller-based device efficiently, and reducing at least some of the problems described above.